﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpGUiBaseInterface.h"
#include "OwnerPtr.h"
#include "IDockManager.h"
#include "GbmpTypeDefs.h"

namespace gcmp
{
    class IApplicationWindow;
    class IUiDocumentViewManager;
    class IUiEditModeManager;
    class IControlDefinitionLibrary;

/// \brief Ui管理器
FINAL_INTERFACE class GCMP_GUI_BASE_INTERFACE_EXPORT IUiManager
{
public:
    /// \brief 析构函数
    virtual ~IUiManager();

    static IUiManager* Get();

    /// \brief 获取程序主窗口对象
    ///
    /// \return Ui程序主窗口对象
    virtual IApplicationWindow* GetApplicationWindow() = 0;

    /// \brief 设置程序主窗口对象
    ///
    /// \return true设置成功， false设置失败
    virtual bool SetApplicationWindow(IApplicationWindow* pWindow) = 0;

    /// \brief 设置弱提示信息面板父窗口
    /// 
    /// \param parentId 父窗口Id（WId),设置错误或者不设置，将不显示弱提示信息
    //  \return 设置成功返回true，否则返回false
    virtual bool SetUiNotificationParent(UInt64 parentId) = 0;

    /// \brief 获取Ui文档视图管理器
    ///
    /// \return Ui文档视图管理器指针
    virtual  IUiDocumentViewManager* GetUiDocumentViewManager() = 0;

    /// \brief 设置Ui文档视图管理器
    ///
    /// \param pUiDocumentViewManager Ui文档视图管理器
    virtual void SetUiDocumentViewManager(IUiDocumentViewManager* pUiDocumentViewManager) = 0;

    /// \brief 获取Ui层编辑模式管理器
    ///
    /// \return Ui层编辑模式管理器指针
    virtual IUiEditModeManager* GetUiEditModeManager() = 0;

    /// \brief 获取控件数据定义库
    ///
    /// \return 控件数据定义库指针
    /// \see IControlDefinitionLibrary
    virtual IControlDefinitionLibrary* GetControlDefinitionLibrary() const = 0;

    /// \brief 获取浮动面板管理器
    ///
    /// \return 浮动面板管理器指针
    /// \see IDockManager
    virtual IDockManager* GetDockManager() const = 0;

    /// \brief 设置浮动面板管理器
    ///
    /// \param pDockManager 浮动面板管理器
    /// \see IDockManager
    virtual void SetDockManager(OwnerPtr<IDockManager> opDockManager) = 0;

    
};

}   // end namespace gcmp

